package cn.wolfcode.luowowo.article.service;

import cn.wolfcode.luowowo.article.domain.Travel;
import cn.wolfcode.luowowo.article.domain.TravelContent;
import cn.wolfcode.luowowo.common.query.TravelQueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface ITravelService {
    /**
     * 查询列表
     * @param qo
     * @return
     */
    PageInfo query(TravelQueryObject qo);

    void deleteById(Long id);

    Long saveOrUpdate(Travel travel);
    /**
     * 查询所有游记
     * @return
     */
    List<Travel> selectAll();

    Travel getById(Long id);

    TravelContent getContent(Long id);

    List<Travel> getTravelTop3(Long id);

    /**
     * 更加作者id查询游记
     *
     * @param authorId
     * @return
     */
    List<Travel> selectByAuthorId(Long authorId);

    /**
     * 查询作者有多少篇游记
     * @param authorId
     * @return
     */
    int queryCountByAuthorId(Long authorId);
}
